﻿@using System.Linq
@using LazyFieldDemo.Models
@{
    var countries = (IEnumerable<Country>)Model.Countries;
    var currentValue = ViewData.TemplateInfo.FormattedModelValue as int?;
    var options = countries.Select(x => new SelectListItem { Text = x.Name, Value = x.Id.ToString(), Selected = x.Id == currentValue });
}
@Html.DropDownList("", options, "Select Country")